home *** CD-ROM | disk | FTP | other *** search
- Path: news.wwa.com!rmartin
- From: rmartin@oma.com (Robert C. Martin)
- Newsgroups: comp.lang.smalltalk,comp.object,comp.lang.c++,comp.lang.java
- Subject: Re: The Good, the Bad, the Ugly, and the Wicked ...
- Followup-To: comp.lang.smalltalk,comp.object,comp.lang.c++,comp.lang.java
- Date: 09 Apr 1996 21:00:10 GMT
- Organization: Object Mentor
- Message-ID: <RMARTIN.96Apr9160010@rcm.oma.com>
- References: <31570B8E.5A12@vmark.com> <4je5rq$7qg@mimas.brunel.ac.uk>
- <4jes0t$gth@decaxp.HARVARD.EDU> <31630E30.5A02@oma.com>
- <4kbq3q$1i8@gaia.ns.utk.edu>
- NNTP-Posting-Host: rcm.oma.com
- In-reply-to: mbk@caffeine.engr.utk.edu's message of 8 Apr 1996 19:40:42 GMT
-
- In article <4kbq3q$1i8@gaia.ns.utk.edu> mbk@caffeine.engr.utk.edu (Matt Kennel) writes:
-
-
- Robert C. Martin (rmartin@oma.com) wrote:
-
- : In any case, it matters little. The more intense the real-time
- : constraint, the more work the engineer will have to go through
- : to manage the automatic garbage collector. (e.g., turning it on or off,
- : throttling it, forcing unscheduled collections, etc.) Thus, eventually
- : one merely trades the job of managing memory, for the job of
- : managing the collector.
-
- It is not a trade, as nearly all garbage collection systems still
- *allow* manual memory management.
-
- Granted. The trade off is in the decision of which approach to manage.
-
- A garbage collector provides a potential solution that is very difficult
- to do without.
-
- In some cases. In others it is difficult to live with. There is no generic
- solution.
-
- : Malloc and new can *always* be made to be deterministic. That is
- : one of the major attractions to manual memory management in
- : real time systems. You can use malloc/free (new/delete) pairs which are
- : 100% predictable.
-
- Are they? Have you gone through the all the possible orderings of
- previous 'new' and 'malloc' so that you ***KNOW*** exactly
- what the internal heap structures are so that subsequent calls to
- 'malloc' and 'new' and 'free' take a known amount of time?
-
- Yes. Simply because it is possible to create memory allocators that
- don't use heaps. Rather they use completely deterministic lists of
- preallocated blocks. The time for 'new' and the time for 'delete' are
- absolutely constant. The exact same number of instructions execute no
- matter what order new and delete are called in.
-
-
- --
- Robert Martin | Design Consulting | Training courses offered:
- Object Mentor Assoc.| rmartin@oma.com | OOA/D, C++, Advanced OO
- 14619 N. Somerset Cr| Tel: (847) 918-1004 | Mgt. Overview of OOT
- Green Oaks IL 60048 | Fax: (847) 918-1023 | http://www.oma.com
-
-